<!DOCTYPE html>
<meta charset="utf-8" />
<head>
<title>Dartou 运维管理平台</title>

<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<link rel="SHORTCUT ICON" href="/static/matrix/images/icon.png">
<link rel="stylesheet" href="/static/matrix/css/bootstrap.min.css" />
<link rel="stylesheet" href="/static/matrix/css/bootstrap-responsive.min.css" />
<!-- <link rel="stylesheet" href="/static/matrix/css/jquery.dataTables.css" /> -->


<link rel="stylesheet" href="/static/matrix/css/matrix-style.css" />
<link rel="stylesheet" href="/static/matrix/css/matrix-media.css" />
<link href="/static/matrix/font-awesome/css/font-awesome.css" rel="stylesheet" />

<link rel="stylesheet" href="/static/matrix/css/toastr.css" />

<script src="/static/matrix/js/jquery.min.js"></script>
<script src="/static/matrix/js/js.cookie.js"></script>
<script src="/static/matrix/js/csrf.token.js"></script>
<script src="/static/matrix/js/bootstrap.min.js"></script>
<script src="/static/matrix/js/matrix.js"></script>
<script src="/static/matrix/js/jquery.JPlaceholder.js"></script>
<script src="/static/matrix/js/layer/layer.js"></script>
<script src="/static/matrix/js/toastr.js"></script>
<!-- <script src="/static/matrix/js/jquery.gritter.min.js"></script> -->
<!-- <script src="/static/matrix/js/matrix.interface.js"></script> -->
<script type="text/javascript">

  setInterval(function(){

    // for(var i=0;i<3;i++){
      $.ajax({
        type:'POST',
        url:'/alarm_data/alarminfo_getalert',
        // data:test,
        dataType:'json',
        success:function(val){
          if(val){
            // console.log(val);
            if (val.today_ok_total != 0 && val.today_problem_total != 0){
              toastr.success('最近2小时左右系统'+'<b>'+val.today_ok_total+'</b>'+"条故障恢复 <a href='/alarm/alarmcharts.html'>点击详情</a>",'恢复通知')
              toastr.error('最近2小时左右系统'+'<b>'+val.today_problem_total+'</b>'+"条故障告警 <a href='/alarm/alarmcharts.html'>点击详情</a>",'告警通知')
            }
            else if(val.today_ok_total !=0){
              toastr.success('最近2小时左右系统'+'<b>'+val.today_ok_total+'</b>'+"条故障恢复 <a href='/alarm/alarmcharts.html'>点击详情</a>",'恢复通知')
            }else if(val.today_problem_total !=0){
              toastr.error('最近2小时左右系统'+'<b>'+val.today_problem_total+'</b>'+"条故障告警 <a href='/alarm/alarmcharts.html'>点击详情</a>",'告警通知')
            }

          }
          // else{
          //  layer.alert("告警加载失败01");
          // }
        }
        // ,error:function(){
        //  layer.alert("告警加载失败02");
        // }
      });
    // };
  },8000);

  function selectBackColor(liId,color){
    $("#"+liId).css("background-color",color).css("color","#000000");
  }

  $(document).ready(function(){
    selectBackColor("{{ appname }}","#EEE");
    var aa=$("#header").outerHeight();
    var bodyHeight=document.documentElement.clientHeight;
    //获取导航标签名
    $("#appgroup").text($('span[name="active_group"]')[0].innerHTML);
	var ahref=$("#{{ appname }}");
		ahref.find("span").empty();
		ahref.find("span").remove();
    $("#appname").text(ahref.text());
    $("#iframe_{{ appname }}").attr("height",bodyHeight-aa);
  });

</script>
{% block head %}{% endblock %}

</head>
<body>

<!--Header-part-->
<div id="header">
  <h1><a href="/home/dashboard.html">Matrix Admin</a></h1>
</div>
<!--close-Header-part-->

<!--top-Header-menu-->
<div id="user-nav" class="navbar navbar-inverse">
  <ul class="nav">
    {% if perms.delete_contenttype %}
    <li class=""><a title="" href="/V/"><i class="icon icon-user"></i> <span class="text">个人中心</span></a></li>
    <!--li class="dropdown" id="menu-messages"><a href="#" data-toggle="dropdown" data-target="#menu-messages" class="dropdown-toggle"><i class="icon icon-envelope"></i> <span class="text">消息中心</span> <span class="label label-important">6</span> <b class="caret"></b></a>
      <ul class="dropdown-menu">
        <li><a class="sAdd" title="" href="#"><i class="icon-plus"></i> 新消息</a></li>
        <li class="divider"></li>
        <li><a class="sInbox" title="" href="#"><i class="icon-envelope"></i> 收件箱</a></li>
        <li class="divider"></li>
        <li><a class="sOutbox" title="" href="#"><i class="icon-arrow-up"></i> 发件箱</a></li>
        <li class="divider"></li>
        <li><a class="sTrash" title="" href="#"><i class="icon-trash"></i> 垃圾箱</a></li>
      </ul>
    </li-->
    <li class=""><a title="" href="/V/password_change/"><i class="icon icon-cog"></i> <span class="text">修改密码</span></a></li>
    {% endif %}
    <li class=""><a title="" href="/logout.html"><i class="icon icon-share-alt"></i> <span class="text">注销</span></a></li>
  </ul>
</div>
<!--close-top-Header-menu-->
<!--start-top-serch-->
<!--div id="search">
  <input type="text" placeholder="Search here..."/>
  <button type="submit" class="tip-bottom" title="Search"><i class="icon-search icon-white"></i></button>
</div-->
<!--close-top-serch-->
<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-cogs"></i> 运维中心</a>
  <ul>
    <li class="{% if appgroup == 'home' %}{{ 'active' }}{% else %}{{ '' }}{% endif %}"><a href="{{ apps.dashboard.url }}"><i class="icon icon-home"></i> <span name="{% if appgroup == 'home' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">{{ apps.dashboard.name }}</span> <span id="dashboard" class="label label-info">V</span></a> </li>

    <li class="submenu {% if appgroup == 'info' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-th-list"></i> <span name="{% if appgroup == 'info' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">信息系统</span> </a>
      <ul>
        {% if perms.Matrix.baseinfo_pagedataList %}
        <li><a href="{{ apps.baseinfo.url }}" id="baseinfo"><i class="icon icon-cloud"></i> {{ apps.baseinfo.name }}</a></li>
        {% endif %}
        {% if perms.Matrix.hostconfig_pagedataList %}
        <li><a href="{{ apps.hostconfig.url }}" id="hostconfig"><i class="icon icon-desktop"></i> {{ apps.hostconfig.name }}</a></li>
        {% endif %}
        {% if perms.Matrix.businessinfo_pagedataList %}
        <li><a href="{{ apps.businessinfo.url }}" id="businessinfo"><i class="icon icon-bar-chart"></i> {{ apps.businessinfo.name }}</a></li>
        {% endif %}
        {% if perms.Matrix.platforminfo_pagedataList %}
        <li><a href="{{ apps.platforminfo.url }}" id="platforminfo"><i class="icon icon-cloud-download"></i> {{ apps.platforminfo.name }}</a></li>
        {% endif %}
      </ul>
    </li>
    {% if perms.Matrix.assetinfo_pagedataList %}
    <li class="submenu {% if appgroup == 'asset' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-briefcase"></i> <span name="{% if appgroup == 'asset' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">硬件资产管理</span> </a>
      <ul>
        <li><a href="{{ apps.assetinfo.url }}" id="assetinfo"><i class="icon icon-folder-open"></i> {{ apps.assetinfo.name }}</a></li>
      </ul>
    </li>
    {% endif %}
    <!-- 20160723 update -->
    <li class="submenu {% if appgroup == 'dns' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-globe"></i> <span name="{% if appgroup == 'dns' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">域名解析</span> </a>
      <ul>
        {% if perms.Matrix.domaininfo_pagedataList %}
        <li><a href="{{ apps.domaininfo.url }}" id="domaininfo"><i class="icon icon-rss"></i> {{ apps.domaininfo.name }}</a></li>
        {% endif %}
        {% if perms.Matrix.dnsinfo_pagedataList %}
        <li><a href="{{ apps.dnsinfo.url }}" id="dnsinfo"><i class="icon icon-google-plus"></i> {{ apps.dnsinfo.name }}</a></li>
        {% endif %}
      </ul>
    </li>
    <!-- end update -->

    <li class="submenu {% if appgroup == 'auto' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-cogs"></i> <span name="{% if appgroup == 'auto' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">配置系统</span> </a>
      <ul>
        <li><a href="{{ apps.autorelease.url }}" id="autorelease"><i class="icon icon-share-alt"></i> {{ apps.autorelease.name }}</a></li>
        <li><a href="{{ apps.autodnspod.url }}" id="autodnspod"><i class="icon icon-refresh"></i> {{ apps.autodnspod.name }}</a></li>
      </ul>
    </li>

    <!-- 20160805 update -->
    <li class="submenu {% if appgroup == 'alarm' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-bell"></i> <span name="{% if appgroup == 'alarm' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">告警管理</span> </a>
      <ul>
        <li><a href="{{ apps.alarmcharts.url }}" id="alarmcharts"><i class="icon icon-bar-chart"></i> {{ apps.alarmcharts.name }}</a></li>
        <li><a href="{{ apps.alarminfo.url }}" id="alarminfo"><i class="icon icon-warning-sign"></i> {{ apps.alarminfo.name }}</a></li>
      </ul>
    </li>
    <!-- end update -->

    <li class="submenu {% if appgroup == 'auth' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-lock"></i> <span name="{% if appgroup == 'auth' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">权限管理</span> </a>
      <ul>
        <li><a href="{{ apps.usermanagement.url }}" id="usermanagement"><i class="icon icon-user"></i> {{ apps.usermanagement.name }}</a></li>
        <li><a href="{{ apps.groupsmanagement.url }}" id="groupsmanagement"><i class="icon icon-group"></i> {{ apps.groupsmanagement.name }}</a></li>
      </ul>
    </li>
    <!-- 206609204 update -->
    <li class="submenu {% if appgroup == 'em' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-calendar"></i> <span name="{% if appgroup == 'em' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">事项管理</span> </a>
      <ul>
        <li><a href="{{ apps.em.url }}" id="em"><i class="icon icon-calendar"></i> {{ apps.em.name }}</a></li>
      </ul>
    </li>
    <!-- end update -->


    <li class="submenu active open"> <a href="#"><i class="icon icon-wrench"></i> <span name="inactive_group">运维管理</span> </a>
      <ul>
        <li><a href="{{ apps.om.url }}" id="om"><i class="icon icon-wrench"></i> {{ apps.om.name }}</a></li>
      </ul>
    </li>

    <!-- 20160923 update -->
    <li class="submenu {% if appgroup == 'link' %}{{ 'active open' }}{% else %}{{ '' }}{% endif %}"> <a href="#"><i class="icon icon-link"></i> <span name="{% if appgroup == 'link' %}{{ 'active_group' }}{% else %}{{ 'inactive_group' }}{% endif %}">时空隧道</span> </a>
      <ul>
        <li><a href="{{ apps.wooyunsearch.url }}" id="wooyunsearch"><i class="icon icon-search"></i> {{ apps.wooyunsearch.name }}</a></li>
      </ul>
    </li>
    <!-- end update -->
<!--     <li> <a href="/OM/"><i class="icon icon-wrench"></i> <span>运维管理</span> </a>
      <ul>
        <li><a href="/OM/" id="usermanagement"><i class="icon icon-user"></i> 运维管理</a></li>
      </ul>
    </li> -->



    <li class="content"> <span>磁盘空间用量</span>
      <div class="progress progress-mini active progress-striped">
        <div style="width: {{ Percent }}%;" class="bar"></div>
      </div>
      <span class="percent">{{ Percent }}%</span>
      <div class="stat">{{ Used }} G / {{ Size }} G</div>
    </li>

  </ul>
</div>

<div id="content">
  <div id="content-header">
    <div id="breadcrumb"> <a href="#" class="tip-bottom"><i class="icon-home"></i> {{ true_name }}</a>&nbsp;运维管理<a href="#" id="appgroup"></a></div>
  </div>
<!-- 启下连接各apps -->
{% block content %}{% endblock %}
</div>

</body>
</html>
